home *** CD-ROM | disk | FTP | other *** search
- #include "VCRplus.h"
-
- extern long CODE_VALUE;
-
- /* first function */
- long f1(long inval)
- {
- long ndigits, hashval ;
- long pwr ;
-
-
- ndigits = 0;
- pwr = 1;
- while(inval >= pwr)
- {
- ndigits++;
- pwr *= 10;
- } ;
-
- if(ndigits > 8)
- SetDText(19, "\pError: number will have more than 8 digits!");
-
- pwr = pwr / 10 ;
-
- hashval = inval;
- again: hashval = mixup(hashval, CODE_VALUE) % (pwr * 10) ;
- if(hashval < pwr) goto again ;
-
- return(hashval);
- }
-